package com.stx.design.Iterator;

public class IteratorTest {

	public static void Test(){
		System.out.println("==============Begin IteratorTest==========");
		
		ConcreteAggregate<String> testCA = new ConcreteAggregate<String>();
		testCA.add("A");
		testCA.add("B");
		testCA.add("C");
		testCA.add("D");
		
		Iterator iterator = testCA.createIterator();
		while(iterator.hasNext()){
			String s = (String)iterator.next();
			System.out.println("item: " + s);
		}
		System.out.println("==============End IteratorTest==========");
	}
	
	
}
